package anivis.ui.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeListener;

import javax.swing.Action;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuItem;

import anivis.AniVisAboutBox;

public class HelpMenu extends JMenu {

    public HelpMenu() {
        super("Help");
        setName("Help");
        setMnemonic('H');
        // add the about part
        JMenuItem aboutMenu = new JMenuItem("About");
        aboutMenu.setName("About");
        aboutMenu.setMnemonic('H');
        aboutMenu.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                // TODO Auto-generated method stub
                AniVisAboutBox aboutBox = new AniVisAboutBox((JFrame)HelpMenu.this.getParent().getParent().getParent().getParent());
                aboutBox.setVisible(true);
            }            
        });
        add(aboutMenu);
    }
    
}
